Revision 80873ebe ChatSecure/Classes/View Controllers/OTRRoomOccupantsViewController.swift
| ChatSecure/Classes/View Controllers/OTRRoomOccupantsViewController.swift | ||
|---|---|---|
| 330 | 330 |
fileprivate func fetchMembersList() {
|
| 331 | 331 |
guard let xmppRoom = xmppRoom() else { return }
|
| 332 | 332 |
xmppRoom.fetchMembersList() |
| 333 |
xmppRoom.fetchModeratorsList() |
|
| 333 | 334 |
} |
| 334 | 335 |
} |
| 335 | 336 |
|
| ... | ... | |
| 359 | 360 |
let cell:OTRBuddyInfoCheckableCell = tableView.dequeueReusableCell(withIdentifier: OTRRoomOccupantsViewController.CellIdentifier, for: indexPath) as! OTRBuddyInfoCheckableCell |
| 360 | 361 |
cell.setCheckImage(image: self.crownImage) |
| 361 | 362 |
var buddy:OTRXMPPBuddy? = nil |
| 363 |
var accountObject:OTRXMPPAccount? = nil |
|
| 362 | 364 |
if let roomOccupant = self.viewHandler?.object(indexPath) as? OTRXMPPRoomOccupant, let room = self.room, let jidString = roomOccupant.realJID ?? roomOccupant.jid, let jid = XMPPJID(string: jidString), let account = room.accountUniqueId {
|
| 363 | 365 |
OTRDatabaseManager.shared.readOnlyDatabaseConnection?.read({ (transaction) in
|
| 364 | 366 |
buddy = OTRXMPPBuddy.fetchBuddy(jid: jid, accountUniqueId: account, transaction: transaction) |
| 367 |
accountObject = OTRXMPPAccount.fetchObject(withUniqueID: account, transaction: transaction) |
|
| 365 | 368 |
}) |
| 366 | 369 |
if let buddy = buddy {
|
| 367 | 370 |
cell.setThread(buddy, account: nil) |
| 368 | 371 |
if let occupantJid = roomOccupant.jid, let ownJid = ownOccupant?.jid, occupantJid.compare(ownJid) == .orderedSame {
|
| 372 |
if let accountObject = accountObject {
|
|
| 373 |
cell.avatarImageView.image = accountObject.avatarImage() |
|
| 374 |
} |
|
| 369 | 375 |
cell.nameLabel.text?.append(" (" + GROUP_INFO_YOU() + ")")
|
| 370 | 376 |
} |
| 371 | 377 |
} else if let roomJid = room.jid {
|
Also available in: Unified diff